<?php namespace Common\Model;
use Hdphp\Model\Model;
class GoodsList extends Model{
	
	protected $table = 'goods_list';
	//设置自动验证用户提交过来的参数
	protected $validate = array(
		//array(字段名,验证方法,错误信息,验证条件,验证时间)
		array('number','required','标签名称不能为空',3,3),
		array('inventory','required','标签名称不能为空',3,3)
		
		
	);
	public function myadd(){
		
		$_POST['combine']=implode(",", $_POST['spec']);
		if($this->create()){
//			p(Q('post.'));exit;
			$gid = $this->add();
		}
	}
	
}